		
		* Table A8
		* Balancing Tests Using Predicted Values of Main Outcomes

		clear all
		set more off
	
		use "C:\Users\EAsker\Desktop\ABR\data\ABR_final_data"
		************************************************************************
		*********************** Drop 2nd and 3rd quartiles *********************
		************************************************************************
		* Keeping only the NELS 1988 for the balancing test
		
		keep if survey==1988
		
	egen student_id=group(stu_id survey)
	sort student_id survey wave mot_hs fat_hs white black hispanic female fam_inc
	duplicates drop student_id, force
	replace fam_inc=. if fam_inc==99|fam_inc==97|fam_inc==0
	gen ln_fam_inc=log(fam_inc)
		
		gen SFR=0
		replace SFR=1 if CSFR_year_BJH~=.
		
		***Predicting outcomes
		
		local controls mot_hs fat_hs ln_fam_inc white black oth_race female
		
		reg high_school `controls'
		predict high_hat
		
		reg high_hat SFR, cluster(fipst)
		
		outreg2 using "C:\Civic\ABR\output_2_15_24\Table_A8.xls", ///
		append ctitle(`y') sdec(4) bdec(4) nonotes nocons keep(SFR) 
		
		reg post_scndry `controls'
		predict post_hat
		
		reg post_hat SFR , cluster(fipst)
		
		outreg2 using "C:\Civic\ABR\output_2_15_24\Table_A8.xls", ///
		append ctitle(`y') sdec(4) bdec(4) nonotes nocons keep(SFR) 
		
		reg vltnry_prtcptn `controls'
		predict vltnry_hat
		
		reg vltnry_hat SFR , cluster(fipst)
		
		outreg2 using "C:\Civic\ABR\output_2_15_24\Table_A8.xls", ///
		append ctitle(`y') sdec(4) bdec(4) nonotes nocons keep(SFR) 
		
		reg vlntry_hours `controls'
		predict hours_hat
		reg hours_hat SFR , cluster(fipst)
		
		outreg2 using "C:\Civic\ABR\output_2_15_24\Table_A8.xls", ///
		append ctitle(`y') sdec(4) bdec(4) nonotes nocons keep(SFR) 
		
		reg register_vote `controls' 
		predict reg_hat
		reg reg_hat SFR , cluster(fipst)
		
		outreg2 using "C:\Civic\ABR\output_2_15_24\Table_A8.xls", ///
		append ctitle(`y') sdec(4) bdec(4) nonotes nocons keep(SFR) 
		